<style type="text/less">
    @import "/web/public/public.less";
    #footer{
        width: 100%;
        background-color: #2D3236;
        color: #ffffff;
        margin-top: 80px;
        position: relative;
        .footer-content{
            width: 1030px;
            margin: 0 auto;
            padding-top: 25px;
            padding-bottom: 25px;
            .clearfix;

            a{
                color: #ffffff;
                font-size: 14px;
                line-height: 36px;
            }
            .title{
                font-size: 16px;
                line-height: 50px;
            }
            .left{
                width: 160px;
                .fl;
                a{
                    display: inline-block;
                    &:nth-of-type(even){
                        margin-left: 25px;
                    }
                }
                .mobile{
                    cursor: pointer;
                    position: relative;
                    color: #ffffff!important;
                    .logo{
                        position: absolute;
                        width: 100px;
                        height: 100px;
                        top: -100px;
                        left: -20px;
                        display: none;
                        img{
                            width: 100%;
                            height: 100%;
                        }
                    }
                    &:hover{
                        .logo{
                            display: block;
                        }
                    }
                }
            }
            .middle{
                width: 550px;
                margin: 0 auto 0 260px;
                .link-wrap{
                    height: 144px;
                    overflow: hidden;
                    margin-left: -25px;
                    a{
                        display: inline-block;
                        margin-left: 25px;
                    }
                }

            }
            .substation{
                li{
                    display: inline-block;
                    margin: 0 10px;
                    a{

                    }
                }
            }
            .right{
                width: 130px;
                text-align: center;
                .fr;
                img{
                    width: 105px;
                    height: 107px;
                }
                .explain{
                    margin-top: 10px;
                }
            }
            hr{
                background-color: #D4D4D4;
                border: 1px;
                margin: 10px 0;
            }
            .copyright{
                font-size: 14px;
                img{
                    vertical-align: middle;
                }
            }
        }
    }
</style>
<script src="/web/lib/less.min.js"></script>
<footer id="footer">
    <div class="footer-content">
        <#if substationList?? && (substationList?size>0)>
            <ul class="substation">
                <#list substationList as substation>
                    <li>
                        <#if substation.channelHomeUrl?length gt 0>
                            <a href="${substation.channelHomeUrl}" target="_blank">${substation.channelName}</a>
                        <#else>
                            <a href="javascript:" target="_blank">${substation.channelName}</a>
                        </#if>
                    </li>
                </#list>
            </ul>
        </#if>
        <hr>
        <div class="left">
            <div class="title">关于我们</div>
            <div class="about-wrap">
                <a href="javascript:" class="feedback" style="color: inherit;cursor: pointer">意见反馈</a>
                <a href="${domain}/web/cooperation.html" rel="nofollow" target="_blank">商务合作</a>
                <a href="${domain}/web/publish.html" rel="nofollow" target="_blank">我要发布</a>
                <a href="${domain}/web/about-us.html" rel="nofollow" target="_blank">关于我们</a>
                <a href="${domain}/web/give-lesson.html" rel="nofollow" target="_blank">我要讲课</a>
                <a href="${domain}/web/contact-us.html" rel="nofollow" target="_blank">联系我们</a>
                <a class="mobile" href="javascript:">
                    手机网站
                    <div class="logo">
                        <img src="/web/img/m.png">
                    </div>
                </a>
                <a href="${domain}/web/add-us.html" target="_blank">加入我们</a>
            </div>
        </div>
        <div class="right">
            <div class="title">${channelName}</div>
            <img src="${siteLogo}" alt="${channelDescription}">
            <div class="explain">IOS&Android</div>
        </div>
        <div class="middle">
            <div class="title"><a href="${domain}/web/friendship-link.html">友情链接 >></a></div>
            <div class="link-wrap">
                <#if latestFriendshipLinks?? && (latestFriendshipLinks?size>0)>
                    <#list latestFriendshipLinks as friendshipLink>
                        <a href="${friendshipLink.linkUrl}" <#if friendshipLink.linkTypeId==26>rel="nofollow"</#if> target="_blank">${friendshipLink.linkName}</a>
                    </#list>
                </#if>
            </div>
        </div>
        <hr>
        <div class="copyright">
            <#if footerImage?? && footerImage.footerStatus==0>
                <#if footerImage.footerUrl?? && (footerImage.footerUrl?length gt 0)>
                <a href="${footerImage.footerUrl}" target="_blank"><img src="${footerImage.footerContent}" alt="logo"></a>
                <#else>
                    <img src="${footerImage.footerContent}" alt="logo">
                </#if>
            </#if>
            <span>
                <#if footerTextList?? && (footerTextList?size>0)>
                    <#list footerTextList as footerText>
                        <#if footerText.footerUrl?? && (footerText.footerUrl?length gt 0)>
                            <a href="${footerText.footerUrl}" rel="nofollow" target="_blank">${footerText.footerContent}</a>
                        <#else>
                            ${footerText.footerContent}
                        </#if>
                    </#list>
                </#if>
                <a href="${domain}/web/website-map.html" target="_blank">网站地图</a>  <a href="${domain}/web/rssList/1.html" target="_blank">RSS订阅</a>  <a href="${domain}/web/tag.html" target="_blank">Tag标签</a></span>
        </div>
    </div>
</footer>
<script src="/web/lib/bootstrap.min.js"></script>
<script src="/web/lib/bootstrap-select.min.js"></script>
<div id="feedback-mask" class="">
    <div class="mask"></div>
    <div class="content-wrap">
        <div class="title">
            意见反馈
            <i class="iconfont icon-guanbi"></i>
        </div>
        <div class="content">
            <div class="item type must-input">
                <div class="item-title">反馈类型：</div>
                <div class="value">
                    <select class="selectpicker-feedback" data-error-sign="请选择"></select>
                </div>
            </div>
            <div class="item intro must-input">
                <div class="item-title">问题描述：</div>
                <div class="value">
                    <textarea name="" id="textarea-intro" placeholder="请尽可能详细说明您遇到的问题"></textarea>
                    <span class="input-limit">0/500</span>
                </div>
            </div>
            <div class="item contact must-input">
                <div class="item-title">联系方式：</div>
                <div class="value">
                    <input type="text" placeholder="手机/微信/QQ/邮箱，方便我们与您联系">
                    <span class="input-limit">0/30</span>
                </div>
            </div>
            <div class="btn-submit">提交</div>
        </div>
    </div>
    <script>
        $.ajax({
            url:ports.getFeedbackType,
            success:function (res) {
                // console.log('获取意见反馈',res);
                if(res.status == 200){
                    var $typeSelect = $('#feedback-mask .content .item.type .selectpicker-feedback');
                    $.each(res.data,function (i,item) {
                        // console.log($typeSelect)
                        $typeSelect.append('<option value='+ item.constantId +'>'+ item.constantName +'</option>')
                    })
                    $('.selectpicker-feedback').selectpicker({});
                }

            }
        })
        $('footer .about-wrap a.feedback').click(function () {
            var linkBootstrap = '<link class="bootstrap-css" rel="stylesheet" href="/web/lib/bootstrap.css">'
            var linkBootstrapSelect = '<link class="bootstrap-select" rel="stylesheet" href="/web/lib/bootstrap-select.min.css">'
            $('title').after(linkBootstrap).after(linkBootstrapSelect);
            $.ajax({
                url: ports.verifyToken,
                success: function (res) {
                    console.log('验证token是否有效', res);
                    if (res.status == 200) {
                        if (!res.data) {
                            window.location.replace(globalUrl.login + "?returnUrl=" + encodeURIComponent(window.location.href));
                        }else {
                            var timer = setInterval(function () {
                                console.log($('.bootstrap-select.btn-group .dropdown-menu').css('z-index'))
                                if($('.bootstrap-select.btn-group .dropdown-menu').css('z-index')!='auto'){
                                    clearInterval(timer);
                                    $('#feedback-mask').addClass('active');
                                }
                            },10)
                        }
                    }
                }
            })

        })
        $('#feedback-mask .icon-guanbi').click(function () {
            $('#feedback-mask').removeClass('active');
            $('link.bootstrap-css').remove();
            $('link.bootstrap-select').remove();

        });
        // var selectTypePass = false,textareaIntroPass = false,inputContactPass = false;
        $('#feedback-mask .selectpicker-feedback').change(function () {
            // selectTypePass = $(this).val() != '0';
            canSubmit()
        })
        $('#textarea-intro').on('input',function () {
            // textareaIntroPass = !!$(this).val().trim();
            var val = $(this).val().trim();
            if(val.length>500){
                $(this).addClass('error')
            }else {
                $(this).removeClass('error');
            }
            $(this).next().html(val.length+'/'+500);
            canSubmit()
        })
        $('#feedback-mask .contact input').on('input',function () {
            // inputContactPass = !!$(this).val().trim();
            var val = $(this).val().trim();
            if(val.length>30){
                $(this).addClass('error');
            }else {
                $(this).removeClass('error');
            }
            $(this).next().html(val.length+'/'+30);
            canSubmit()
        })
        function canSubmit() {
            var selectTypePass = $('#feedback-mask .selectpicker-feedback').val() != '0',
                textareaIntroPass = $('#textarea-intro').val().trim()&&$('#textarea-intro').val().trim().length<=500,
                inputContactPass = $('#feedback-mask .contact input').val().trim()&&$('#feedback-mask .contact input').val().trim().length<=30;
            if(selectTypePass&&textareaIntroPass&&inputContactPass){
                $('#feedback-mask .btn-submit').addClass('active');
            }else {
                $('#feedback-mask .btn-submit').removeClass('active');
            }
        }
        $('#feedback-mask .btn-submit').click(function () {
            if($(this).hasClass('active')){
                $.ajax({
                    url:ports.submitFeedback,
                    data:{
                        feedbackType:$('#feedback-mask .selectpicker-feedback').val(),
                        briefIntro:$('#feedback-mask .intro textarea').val().substr(0,500),
                        contactInformation:$('#feedback-mask .contact input').val().substr(0,30)
                    },
                    success:function (res) {
                        console.log('提交意见反馈',res)
                        if(res.status == 200){
                            $('#feedback-mask').removeClass('active');
                            $('link.bootstrap-css').remove();
                            $('link.bootstrap-select').remove();

                            //提交成功后清空表单信息
                            $('#feedback-mask .selectpicker-feedback').val('0');
                            $('.dropdown-menu.inner>li').removeClass('selected');
                            $("li[data-original-index='0']").addClass('selected');
                            $('button.dropdown-toggle').prop('title','请选择');
                            $('button.dropdown-toggle .filter-option').text('请选择');
                            $('#textarea-intro').val('');
                            $('#feedback-mask .contact input').val('');
                            $('#feedback-mask .btn-submit').removeClass('active');

                            utils.showModal({
                                content:'小编已收到您的信息，<br>感谢您对政府采购信息网的支持！'
                            });
                        }

                    }
                })
            }
        })
    </script>
</div>
<!-- 网站安全检测 -->
<div style="display:none">
    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https'){
                bp.src = "https://zz.bdstatic.com/linksubmit/push.js";
            }
            else{
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>
    <script type="text/javascript">
        (function(){
            document.write(unescape('<div id="bdcs"></div>'));
            var bdcs = document.createElement('script');
            bdcs.type = 'text/javascript';
            bdcs.async = true;
            bdcs.src = 'https://znsv.baidu.com/customer_search/api/js?sid=13929497944717324959' + '&plate_url=' + encodeURIComponent(window.location.href) + '&t=' + Math.ceil(new Date()/3600000);
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(bdcs, s);
        })();
    </script>
    <script src="https://s4.cnzz.com/z_stat.php?id=1260890828&web_id=1260890828" language="JavaScript"></script>
    <a href="https://webscan.360.cn/index/checkwebsite/url/www.caigou2003.com" name="4918ce506bc163ed9565998137c240dd"></a>
</div>
<!-- 百度收录 -->
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?da7ca6d2857169e7f89d2ebd108b956d";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<!-- 360收录 -->
<script>
    (function(){
        var src = "https://s.ssl.qhres2.com/ssl/ab77b6ea7f3fbf79.js";
        document.write('<script src="' + src + '" id="sozz"><\/script>');
    })();
</script>